package com.vftour.stu.mq.rabbitmq.handler;

import com.vftour.stu.mq.rabbitmq.constant.RabbitConstant;
import lombok.extern.slf4j.Slf4j;
import org.springframework.amqp.rabbit.annotation.RabbitListener;
import org.springframework.stereotype.Component;

/**
 * FanoutQueueHandler
 *
 * @version 1.0
 * @author: 东东 | d@tke.store
 * @date :  2022/3/5 4:51 下午
 */
@Slf4j
@Component
public class FanoutQueueHandler {

    @RabbitListener(queues = RabbitConstant.FANOUT_QUEUE_ONE)
    public void directOneHandler(String message) {
        System.out.println("one-----" + message);
    }

    @RabbitListener(queues = RabbitConstant.FANOUT_QUEUE_TWO)
    public void directTwoHandler(String message) {
        System.out.println("two-----" + message);
    }
}
